//
//  ControlTemplateViewRecordController.h
//  Uhomebk
//
//  Created by 揭婧雯 on 17/3/3.
//  Copyright © 2017年 com.segi. All rights reserved.
//

#import <UIKit/UIKit.h>

#pragma mark -
#pragma mark 录音【record】
#import <AVFoundation/AVFoundation.h>

@interface ControlTemplateViewRecordController:UIViewController<AVAudioRecorderDelegate,AVAudioPlayerDelegate>
{
    NSOperationQueue *queue;
    
    AVAudioRecorder *avRecorder;
    AVAudioSession *session;
    AVAudioPlayer *player;
    NSDictionary *settings;
    
    NSString* playName;
    double lowPassResults;
    NSTimer *timer;
    UILabel *timeValueLabel;
    
    NSTimer *timer2;
    NSInteger   timenum;
}
+ (ControlTemplateViewRecordController *)sharedManagerRecord;
@property (nonatomic,retain) NSString *paramId;
@property (nonatomic,strong) UIViewController *masterVC;
@property (nonatomic,retain) NSDictionary *params;
@property (nonatomic,strong) UIView *bgMainView;
@property (nonatomic,strong) NSData *soundData;

@property (nonatomic, strong)   NSString                    *param_id;          /**<控件的paramID*/
@property (nonatomic, strong)   NSString                    *valueStr;          /**<保存控件的值*/
@property (nonatomic, strong)   NSString                    *optional;          /**<是否必填项 0-必填  1-非必填*/
@property (nonatomic, strong)   NSMutableArray              *soundDataArray;    /**<声音数组*/

/**
 *  给录音控件填充值
 *
 *  @param valueStr 接收字符串值
 */
-(void)paddingRecordView:(NSString *)valueStr;


- (void)onPlayAudioUrl:(CustomButtonView*)sender;
@end








